<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%@ page import="de.leuphana.internet.model.*"%>

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<fmt:setLocale value="en"/>
<c:if test="${sessionScope.lang == null}">
	<fmt:setBundle basename="de.leuphana.internet.model.ApplicationResources"
		var="lang" scope="session"/>
</c:if>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><fmt:message key="katalog.titel" bundle="${sessionScope.lang}"/></title>
</head>
<body>	
	<c:import url="/Banner" />

	<jsp:useBean id="katalog" scope="application"
		class="de.leuphana.internet.model.Katalog"/>
		
		<fmt:message key="katalog.jahr" bundle="${sessionScope.lang}"/>
		<table border='1'>
		<tr>
		<th>ISBN</th>
		<th><fmt:message key="buch.buchTitel" bundle="${sessionScope.lang}"/></th>
		<th><fmt:message key="buch.preis" bundle="${sessionScope.lang}"/></th>
		</tr>
		<c:forEach var="buch" items="${applicationScope.katalog.alleBuecher}">
			<tr>
				<td><c:out value="${buch.isbn}"/></td>
				<td><a href='<c:url value="./BuchAnzeigen.htm">
								<c:param name="isbn" value="${buch.isbn}" />
							</c:url>
					'><c:out value="${buch.buchTitel}"/></a></td>
				<td><c:out value="${buch.preis}"/></td>
				
				<td><a href='<c:url value="./WarenkorbAnzeigen.htm">
								<c:param name="isbn" value="${buch.isbn}" />
							</c:url>
					'>Buch hinzufuegen</a>
				</td>
			</tr>
		</c:forEach>
		</table>

</body>
</html>